Release 10.1A: OpenEdge Reporting:
Query/Results for UNIX


Horizontal menu options for the Reports module

This section presents the horizontal menu options you can use for the Reports module of Results.

Define

Selects files and fields for the report. This option produces different results depending on if there is any report definition information displayed in the Report Info or Report Layout windows:

Totals and subtotals

Enables you to insert totals, counts, minimums, maximums, and averages for any fields in the report.

When you select this option, a list of fields currently defined for the report appears. You select a field and a window opens that enables you to define total and subtotal information.

This option enables you to determine what aggregate values to accumulate in a summary line for each field (Total, Count, Min, Max, Avg). For each value you choose, a summary line appears at the bottom of the report under the column. The summary line displays the specified aggregate value for the column.

When you select an aggregate value, a character symbol appears beneath the field area in the report layout window to mark its inclusion. For example, when you pick Total for a field, a “t” character appears in the report layout beneath the field area. Other character symbols used: “a” for average, “n” for minimum, “x” for maximum, and “c” for count.

If you select this option after you define a sort order (using the Order option), you can provide totals for break groups (sections).

Running total

Inserts a column in the report that displays the running total of any numeric field or expression. A running total increments for each line of data. So, the value displayed in that column on any line of the report equals the sum of the field value for that line and all previous lines in the column.

When you select this option, you see a list of all of the fields in the current active files that have numeric values. In the Reports module, you also see any defined numeric expressions.

In the Reports module, when you select a field for a running total, a window opens that enables you to redefine the default label and format for the running total. By default, the label is Running Total and the default format is the same as the format for the totaled field. In the Data Export module, you can redefine the format only. For information on formats, see Appendix C "Field Display Formats."

When you insert a running total, it appears in the Layout window. When you see this field in the layout window, it is not prefixed with names of a database and file. They do not appear with the field name because it is a calculated field defined for the report. Calculated fields are not from a database file. In the Reports module, an *r marker appears beneath the column definition to show that this is a running total field.

Percent of total

Inserts a column in the report that displays a percent of total value for a numeric field or expression. This percent of total value represents the percent of the total values in the column that this line in the column represents.

This option works the same way as Running Totals, except that the default label is Percent of Total and the *p marker shows that this is a percent of total field. This field has a standard display format of ->>>9.9%. For information on formats, see Appendix C "Field Display Formats."

Counters

Inserts a column in the report to display a running counter. Counters are useful for line numbering and running record count.

When you select this option a window appears that enables you to define the starting number for the counter, and the number to add for each record. This option inserts the column into the Layout window the same way as Running Totals, except that in the Reports module the default label is Counter and the *c marker shows that this is a counter field.

Math expressions (+ -*/)

Defines a math expression and adds it as a column in the report.

Once you select this option, a window shows the operations you can perform:

This is a menu-driven process that enables you to select the elements to build a simple or complex math expression. To build a short expression, select an operation and the appropriate field(s) or number(s). To build a long expression, just keep adding options and values to the expression by entering Yes to continue.

Results automatically enters parentheses in long expressions. It assumes a left to right evaluation. For example, if you use the menus to enter the following expression:

4 + 5 * 6 + 7 

Results uses parenthesis to make it:

( ( 4 + 5 ) * 6 ) + 7 

Or, if you enter:

2 * 4 + 3 / 6 

it becomes:

((2 * 4) + 3) / 6 

See Appendix F, "Order of Evaluation," for more information about evaluating expressions.

This option inserts the column into the Layout window the same way as Running Totals, except that in the Reports module the default label is Math Value and the marker *n shows that this is a numeric expression field.

String expressions

Defines a string calculation and adds the expression as a column in the report. Once you select this option, a window appears with the operations you can perform:

You select the elements to build the string expression from a list. For string expressions that involve more than one element, the process enables you to select the first element in the expression, then the operator, then the second element. For example, you might want Results to combine fields and make them one string on your report to save space. So, you can select the Combine Two Strings option from the list and the two fields that you want to combine. This option inserts the column into the Layout window the same way as Running Totals, except that in the Reports module the default label is String Value and the *s marker shows that this is a string expression field.

Numeric expressions

Defines a numeric expression and inserts it as a column in the report. When you select this option, a window displays a list of operations you can perform:

You select the elements to build the numeric expression from a list. For numeric expressions that involve more than one element, the process enables you to select each element separately.

This option inserts the column into the Layout window the same way as Running Totals, except that in the Reports module the default label is Numeric Value and the *n marker shows that this is a numeric expression field.

Date expressions

Defines a date calculation and inserts it as a column in the report.

When you select this option, a window presents a list of all the date expressions you can define:

You select the elements to build the date expression from a list. For date expressions involving more than one element (for example, the difference between two dates), the process enables you to select each element separately.

This option inserts the column into the Layout window the same way as Running Totals, except that in the default label is Date Value and the *d marker shows that this is a date expression field.

Settings

Controls general report settings such as headers and spacing. When you choose this option, the screen presents a menu with the following options:

You type text information into a window. You can insert values such as PAGE, TODAY, TIME, USER, and so forth, into the header section if you delimit them with curly brace ({ and }) characters. You can include the following functions: {COUNT}, {TODAY}, {PAGE}, {TIME}, {NOW}, {USER}, and {VALUE}.

The {VALUE} variable enables you to include field information in headers and footers. Use the format: {VALUE database.file.field; format}. Or, you can press the GET key (F5 or CTRL-G) to pull up a list of fields to insert in the header. When you select one of the fields in the list, Results automatically puts it in the VALUE format for you. For example, you could use the following function in a header:

 {VALUE mysports.customer.Sales-region; x(20)} 

This places the sales region for the first record on the page in the header. For example, Central appears in the header if the first customer record on the page is in the Central sales region.

You can substitute angle brackets ( < ) to replace the curly braces ( { } ) around any function. Also, your database administrator can edit the results.l file to change the default symbols for the VALUE option. That way, when you use the GET key and pick a field from the list, the default symbols automatically appear.

Note: Always enter the numeric format for the VALUE function in American format, even when Results is set to default to the European numeric format (using the European Numeric Format (-E) startup option). In American format, a decimal point (.) marks the decimal location in fields and a comma (,) acts as a place holder. If you enter a European numeric format for the VALUE function, an error message appears. When you run the report with Results set to default to European numeric format, Results automatically converts the American format for VALUE to European numeric format. For more information about the -E startup option, see Appendix C "Field Display Formats."

Center header

Specifies up to three lines of centered header information.

Right header

Defines up to three lines of right header information.

Left footer

Specifies up to three lines of left footer information. A footer is text, such as a page number, that appears at the bottom of the page on a report.

Center footer

Inserts up to three lines of centered footer information.

Right footer

Inserts up to three lines of right footer information.

Note: When you define three types of headers (or footers) for a report, they print in different ways depending on the available header space. If there is enough room to fit all three values across, they print three across. Otherwise, the center header prints first, then the left and right headers appear on the next two lines.

First-page-only header

Defines a header that appears only on the first page of the report. This type of header is centered near the top of the page. If you have another type of header defined, the First-page-only header appears after it.

Last-page-only footer

Defines the content of a footer that appears only on the last page of the report. This type of footer is centered near the bottom of the page. If you have another type of footer defined, the content of the Last-page-only footer appears before it on the last page of the report. The Last-page-only footer does not appear in the Report Layout window, but does appear when you print or display the report.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095